package model.command;
import controller.Controller;
import controller.KeyListeners.*;

/**
 * Defines the traits common to all commands
 *
 * @author joseph walker
 */
public abstract class Command implements Cloneable {
    /**
     *
     *
     * @param listeners             The set of key listeners availible to this command
     */
    public Command(){}
    /**
     * This should attack a command to a key listener.
     */
    public abstract void attachToListener();
    /**
     * 
     * @return
     */
    @Override
    public abstract Command clone();
    /**
     * This should execute the command.
     */
    public abstract void executeCommand();
    /**
     * Returns the list of key listeners availible to this command
     *
     * @return              a set of key listeners
     */
    public KeyListenerSet getListeners(){
        return Controller.getListeners();
    }
}
